
import java.io.IOException;
import java.io.StringReader;
import org.wltea.analyzer.IKSegmentation;
import org.wltea.analyzer.Lexeme;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Administrator
 */
public class NewClass {
    public static void main( String[] args ) throws IOException{
    String str = "用友软件股份";
    StringReader reader = new StringReader(str);
    IKSegmentation ik = new IKSegmentation(reader,false);//当为true时，分词器进行最大词长切分
    Lexeme lexeme = null;
    while((lexeme = ik.next())!=null)
    System.out.println(lexeme.getLexemeText());
    }

}
